import type { IModalConfig } from '@/global/types'

export const skuEditModalConfig: IModalConfig = {
  pageName: 'goodSku',
  type: 'drawer',
  layout: {
    title: '编辑sku信息',
    size: '35%',
    showClose: true, // 是否显示右上角关闭图标
    closeOnClickModal: true // 点击遮罩层是否能关闭对话框
  },
  form: {
    layout: {
      isShowBtns: false,
      labelWidth: '90px',
      size: 'default'
    },
    items: [
      {
        type: 'img',
        prop: 'img',
        span: 24,
        label: '规格值图片'
      },
      {
        type: 'input',
        prop: 'specificationName',
        span: 24,
        label: '规格名',
        placeholder: '请输入规格名',
        required: true
      },
      {
        type: 'input',
        prop: 'name',
        span: 24,
        label: '规格值',
        placeholder: '请输入规格值',
        required: true
      },
      {
        type: 'select',
        prop: 'isShow',
        span: 24,
        label: '状态',
        placeholder: '请选择状态',
        options: [
          { value: 1, label: '显示' },
          { value: 0, label: '隐藏' }
        ]
      },
      {
        type: 'input',
        prop: 'specificationPrice',
        span: 24,
        label: '价格',
        placeholder: '请输入规格对应的价格'
      },
      {
        type: 'custom',
        slotName: 'uploadImage',
        span: 24
      }
    ]
  }
}

export default skuEditModalConfig
